Release 10.1A: OpenEdge Development:
Programming Interfaces
Formatting long text strings
The remaining problem for simple output is how to handle long text strings. A text widget that contains a long string may cause formatting problems such as skipping to a new line or truncating. For screen design, you saw earlier that the editor widget is a good choice for holding long text strings. The editor is also the solution for reports. With the editor, you can output text in blocks.
For example, the Comments field in the Customer table has a format of
x(60). Reserving 60 spaces takes up most of a line in a standard printed report. You can override this default behavior by specifying aVIEW-AS EDITORphrase for the Comments field. When you output a field or variable value as an editor widget, Progress uses theINNER-CHARSattribute of the editor to format and wrap the text into a block. TheINNER-LINESsyntax sets the minimum number of lines the block occupies. If there is enough data to fill more lines than specified byINNER-LINES, then Progress provides the extra room.
![]()
To see an example of editor output in reports:
Here is the code:
INNER-LINESreserves at least three lines per iteration of the report.INNER-CHARSsets the length of the text block at 25 characters.
INNER-LINESreserves at least three lines per iteration of the report.INNER-CHARSsets the length of the text block at 20 characters.This section concludes the basic discussion on creating a reporting procedure. The next few sections concentrate on the techniques for populating reports with more complex data.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |